#/bin/bash

#首先需要source该脚本
#进入shell的本地路径

desDir=${BASH_SOURCE%\/*}

if [ "$desDir" == "build_project.sh" ];then
	desDir=$(pwd)
else
	desDir=$(pwd)/${desDir}
fi

echo "build_project.sh:$desDir"

echo "version type:"
echo "0:release    1:debug"
echo -ne "please input version type:"
read _version_

export _version_

#编译模块<-->make
function mm()
{
	echo "Compile module start!"
	
	make all -f Makefile;
	echo "Build done!!!"
}

#清理编译生成文件<-->make clean
function mc()
{
	echo "Clear module start!"
	
	make clean -f Makefile;
	echo "Clear done!!!"
}

#编译整个工程
mc;mm
